﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Maps.MapControl;
using Microsoft.Maps.MapControl.Core;

namespace ExpoLight
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            UriBuilder tileSourceUri = new UriBuilder("http://r2.tiles.ditu.live.com/tiles/r{quadkey}.png?g=41");
            MapTileLayer tileLayer = new MapTileLayer();
            LocationRectTileSource tileSource = new LocationRectTileSource(tileSourceUri.Uri.ToString(), new LocationRect(new Location(60, 60), new Location(13, 140)), new Range<double>(1, 16));
            tileLayer.TileSources.Add(tileSource);
            tileLayer.Opacity = 0.9;
            mainMap.Children.Add(tileLayer);

        }
    }
}
